<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<h2>您好欢迎访问贵美商城！</h2>
		<script>
			function showTime(){
			var time=new Date();
			year=time.getFullYear();//获取年
			month=time.getMonth()+1;//获取月
			day=time.getDate();//几号
			hour=time.getHours();
			minutes=time.getMinutes();
			secouds=time.getSeconds();
			var sx =(hour>12?"PM":"AM");
			str=year+"年"+month+"月"+day+"日"+" "+sx+hour+":"+minutes+":"+secouds+" 星期:"+getWeekday(time);
			document.getElementsByTagName("div")[0].innerHTML=str;
			}
			function getWeekday(time){
				switch(time.getDay()){
					case 0:
					weekday="日";
					break;
					case 1:
					weekday="一";
					break;
					case 2:
					weekday="二";
					break;
					case 3:
					weekday="三";
					break;
					case 4:
					weekday="四";
					break;
					case 5:
					weekday="五";
					break;
					case 6:
					weekday="六";
					break;
				}
				return weekday;
			}
			
			setInterval(showTime,1000);
			
		</script>
	</head>
	<body>
		<div>
			
		</div>
		
	</body>
</html>
